home *** CD-ROM | disk | FTP | other *** search
- Path: ebcs46.ebc.ericsson.se!usenet
- From: Eric Raquette <eric.raquette@era.ericsson.se>
- Newsgroups: comp.sys.m68k
- Subject: Re: 68302 and AMD Flash programming
- Date: Fri, 15 Mar 1996 15:14:40 +0100
- Organization: Ericsson Radio Systems AB
- Message-ID: <31497B50.ABD322C@era.ericsson.se>
- References: <4ia6rk$ro0@news.connectnet.com>
- NNTP-Posting-Host: ebcw301.ebc.ericsson.se
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.4 sun4m)
-
- Mike Saunders wrote:
- >
- > I am trying to reprogram AMD Flash AMF010A in system with a Motorola
- > 68302 as the controller. Does anyone have any hints on how to get
- > this done?
-
- Something like this,it depends on the buswidth to the flash(this is 32bit).
- It copies a sector from dram/sram to flash,and can of course not be
- executed in the same flash as beeing programmed.
- This example has no error checking or recovery,use it only from a debugger.
-
- COPY_TO_FLASH:
- move.l #$AAAAAAAA,$00015554
- move.l #$55555555,$0000AAA8
- move.l #$80808080,$00015554
- move.l #$AAAAAAAA,$00015554
- move.l #$55555555,$0000AAA8
- move.l #$30303030,$00000000 ;SECTOR 0 START
- move.l #$30303030,$00004000 ;SECTOR 1 START
- MOVE.L #$FFFFFFFF,D0
- CHECK_ERASE:
- CMP.L ($00000000),D0
- BNE.B CHECK_ERASE ;all ones after erase is done
-
- LEA.L $00000000,A0 ;VECTOR 0 AT RESET,start of flash
- LEA.L $fd000000,A1 ;this is where the code is stored
- MOVE.L #$8000,D1 ;copy 128K BYTES
- COPY:
- MOVE.L (A1),D0
- WRITE_FLASH:
- move.l #$AAAAAAAA,$00015554
- move.l #$55555555,$0000AAA8
- move.l #$A0A0A0A0,$00015554
- move.l d0,(a0)
- CHECK_BYTE:
- cmp.l (a0),d0
-
- bne.b CHECK_BYTE
-
- ADDA.L #$4,A0
- ADDA.L #$4,A1
- DBF D1,COPY
- READY:
-
-
- --
- NA/ERA/BR/TR/MD Eric Raquette
- Ericsson Radio Systems AB
- S-131 89 Stockholm, Sweden
- Visit addr. (Augustendalsvagen 21,Nacka Strand)
- Phone: +46 8 42 20641 Fax: +46 8 42 21010
- email: Eric.Raquette@era.ericsson.se
- ---------------------------------------------------------
-